﻿using Pattern17状态模式.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pattern17状态模式.Models
{
    public class WholeState : IState
    {
        public int Flag => 3;

        public void Handle(IContext context)
        {
            Console.WriteLine("正在进行整板检测...");

            if (context.SubBoard != null)
            {
                context.SetState(new ChildState());
            }
            else
            {
                context.SetState(new ExitState());
            }
            
        }
    }
}
